package com.wrupple.vegetate.client.module.services.logic;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.json.client.JSONValue;
import com.wrupple.vegetate.domain.CatalogDescriptor;

public interface EntryProcessingService {

	/**
	 * gets the entry id value according to it's catalog descriptor
	 * 
	 * @param entry
	 *            the entry
	 * @param catalog
	 *            descriptor
	 * @return the value of the key Field of an entry
	 */
	String getEntryId(JavaScriptObject entry, CatalogDescriptor catalog);

	JSONValue getEntryField(String fieldName, JSONObject entry, CatalogDescriptor catalog);

	String getEntryId(JavaScriptObject entry, String catalog);
	
	String getEntryName(JavaScriptObject entry, String catalog);

}
